package com.leyou.common.enums;
import lombok.AllArgsConstructor;

import lombok.Data;
import lombok.NoArgsConstructor;

@AllArgsConstructor
@NoArgsConstructor
public enum ExceptionEnum {

    CATEGORY_NOT_FOUD(404,"商品分类没查到"),
    BRAND_NOT_FOUND(404,"品牌没查到"),
    GOODS_NOT_FOUND(404,"商品没查到"),
    SPEC_GROUP_NOT_FOND(404,"分类组没查询到"),
    SPEC_PARAM_NOT_FOND(404,"商品规格参数不存在"),
    GOODS_DETAIL_NOT_FOND(404,"商品的详情不存在"),
    GOODS_SKU_NOT_FOND(404,"商品的SKU不存在"),
    GOODS_STOCK_NOT_FOUND(404,"商品的库存不存在"),
    GOODS_SAVE_ERROR(500,"新增商品失败"),
    BRAND_SAVE_ERROR(500,"新增品牌失败"),
    UPLOAD_FILE_ERROR(500,"文件上传失败"),
    INVALID_FILE_TYPE(500,"无效的文件类型"),
    BRAND_DELETE_ERROR(500,"删除品牌失败"),
    GOODS_ID_CANNOT_BE_NULL(500,"商品的id不存在"),
    GOODS_UPDATE_ERROR(500,"修改商品失败"),
    INVALID_USER_DATA_TYPE(400,"用户的数据类型无效"),
    INVALID_VERIFY_CODE(400,"无效的验证码"),
    INVALID_USERNAME_PASSWORD(400,"无效的用户名密码"),
    CREATE_TOKEN_ERROR(500,"用户凭证生成失败"),
    UNAUTHORIZED(403,"未授权"),
    CART_NOT_FOUND(404,"购物车不存在"),
    CREATE_ORDER_ERROR(500,"创建订单失败"),
    STOCK_NOT_ENOUGH(500,"库存不足"),
    ORDER_NOT_FOUND(404,"订单不存在"),
    ORDER_DETAIL_NOT_FOUND(404,"订单详情不存在"),
    ORDER_STATUS_NOT_FOUND(404,"订单状态信息不存在"),
    WX_PAY_ORDER_FAIL(500,"微信通信失败"),
    ORDER_STATUS_ERROR(400,"订单状态不正确"),
    INVALID_SIGN_ERROR(400,"无效的签名"),
    INVALID_ORDER_PARAM(400,"无效的参数"),
    UPDATE_ORDER_STATUS_ERROR(500,"更新订单状态失败"),
    ;

    private int code;
    private String msg;

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

    public void setCode(int code) {
        this.code = code;
    }
}
